<div class="pt-2" ...attributes>
    <input value="{{this.inputSearchValue}}" type="text" required="{{@required}}" form="{{@form}}" name="{{@name}}" class="hidden" valuestr="{{this.inputSearchValuestr}}"/>
    <label class="block">{{@key}}{{#if @required}}<span class="text-red-500">*</span>{{/if}}</label>
    <input value="{{this.inputSearchText}}" type="text" placeholder="{{this.placeholderText}}" name="text-{{@name}}" {{on "click" this.directSearch}} {{on "keyup" this.startSearch}} {{on "blur" this.closeSearch}} class="block disabled:bg-gray-50 disabled:cursor-not-allowed mt-2 w-full placeholder-gray-400/70 dark:placeholder-gray-500 rounded-lg border bg-white px-5 py-2.5 text-gray-700 focus:outline-none focus:ring focus:ring-opacity-40 dark:bg-gray-900 dark:text-gray-300 {{if this.err "border-red-400 focus:border-red-400 focus:ring-red-300 dark:border-red-400 dark:focus:border-red-300" "border-gray-200 focus:border-blue-400 focus:ring-blue-300 dark:border-gray-600 dark:focus:border-blue-300"}}"/>

    {{#if this.showSearch}}
    <div class="absolute z-20 py-2 mt-2 origin-top-right bg-gray-50 rounded-md shadow-xl dark:bg-gray-800 w-full max-w-md">
      {{#if this.args.selectMode}}
        <a href="#" {{on "click" (fn this.selectOne this.clearOption)}} class="block px-4 py-3 text-sm text-gray-600 capitalize transition-colors duration-300 transform dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white {{if (eq this.inputSearchValue '') 'bg-blue-50 dark:bg-blue-900'}}"> {{this.clearOption.name}} </a>
      {{/if}}
      {{#each this.filteredItems as |item|}}
      <a href="#" {{on "click" (fn this.selectOne item)}} class="block px-4 py-3 text-sm text-gray-600 capitalize transition-colors duration-300 transform dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white {{if (eq item.id this.inputSearchValue) 'bg-blue-50 dark:bg-blue-900'}}"> {{item.name}} </a>
      {{/each}}
    </div>
    {{/if}}
    {{#if this.err}}
    <p class="mt-3 text-xs text-red-400">{{if @selectMode "请选择" "请填写"}}{{@key}}</p>
    {{/if}}
</div>